{qb:hy name="party_form_001001" val="data" class="app\party\index\Order@label" conf="model_style/default/party_form.php"}

{php}
$info = $data['info'];
$GLOBALS['abcd'] = $info;
$GLOBALS['farray'] = $data['f_array'];
{/php}


<script type="text/javascript">
$(function(){
	$(".PostOrder .butter button").click(function(){
		layer.msg('请稍候...');
		if(check_post()!==true){
			return false;
		}
		$.get("{:urls('party/car/add')}?shopid={$info.id}",function(res){	//先加入购物车
			if(res.code==0){
				$.post("{:urls('party/order/add')}",$('.PostOrder form').serialize(),function(res){
					if(res.code==0){
						layer.msg("感谢你的参与,数据已提交!");
						$(".PostOrder").hide(1000);
					}else{
						layer.alert(res.msg);
					}
				});
			}else{
				layer.alert(res.msg);
			}
		});
	});
});
</script>

{/qb:hy}








{if $GLOBALS['farray']}

<style type="text/css">
.PostOrder{
	border:1px solid #ddd;
	border-radius:10px;
	padding:30px 80px;
	margin:30px;
	background:#f9f9f9;
}
.PostOrder ul{
	margin-top:10px;
}
.PostOrder input,.PostOrder select{
	height:25px;
}
.PostOrder input[type=text],.PostOrder textarea{
	width:100%;
}
.PostOrder .butter button{
	line-height:35px;
	background:orange;
	border:0px;
	padding:0px 30px;
	color:#fff;
	border-radius:5px;
}
.PostOrder .butter{
	text-align:center;
}
.PostOrder .must-choose ol{
	color:red;
}

@media (max-width: 600px) {
	.PostOrder{
		border:1px solid #ddd;
		border-radius:10px;
		padding:30px 20px;
		margin:30px 10px;
		background:#f9f9f9;
	}
}
</style>
<div class="PostOrder">
	<form action="" method="post">
{qb:form name="xxx" f_array="$GLOBALS['farray']"}
		<ul class="{$rs.ifmust?'must-choose':''} {$rs.customize}" data-type="{$rs.type}" data-title="{$rs.title}">
			<ol>{$rs.title}</ol>
			<li>{$rs.value}</li>
		</ul>
{/qb:form}
		<div class="butter">
			<button type="button">提交</button>
			<input type="hidden" name="order_field" id="order_field">
		</div>
	</form>
</div>
<script type="text/javascript" src="__STATIC__/js/order.js"></script>

{else /}

	<div style="color:red;margin:50px;">请双击页面,修改标签设置一个活动报名主题</div>

{/if}